<html>
<head><meta charset="utf-8"><title>How can I emit LLVM IR from library/std · t-compiler/help · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/index.html">t-compiler/help</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/How.20can.20I.20emit.20LLVM.20IR.20from.20library.2Fstd.html">How can I emit LLVM IR from library/std</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="224414294"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/How%20can%20I%20emit%20LLVM%20IR%20from%20library/std/near/224414294" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jake Hughes <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/How.20can.20I.20emit.20LLVM.20IR.20from.20library.2Fstd.html#224414294">(Jan 29 2021 at 00:19)</a>:</h4>
<p>Hi, is there a straightforward way to emit the LLVM IR generated from <code>./x.py build library/std</code>?</p>



<a name="224421103"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/How%20can%20I%20emit%20LLVM%20IR%20from%20library/std/near/224421103" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nyms <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/How.20can.20I.20emit.20LLVM.20IR.20from.20library.2Fstd.html#224421103">(Jan 29 2021 at 01:37)</a>:</h4>
<p>you can pass stage specific compilation flags, something like: <code>RUSTFLAGS_NOT_BOOTSTRAP="--emit llvm-ir" ./x.py build --stage-you-want-ir-for library/std</code></p>



<a name="224452434"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/How%20can%20I%20emit%20LLVM%20IR%20from%20library/std/near/224452434" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jake Hughes <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/How.20can.20I.20emit.20LLVM.20IR.20from.20library.2Fstd.html#224452434">(Jan 29 2021 at 10:24)</a>:</h4>
<p><span class="user-mention" data-user-id="354190">@nyms</span>  very cool. thank you!</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>